public class TestMain {
    public int Description(int[] nums,int k) {
        int left = 0;
        int right = nums.length - 1;
        while(left < right) {
            int mid = (left + right) / 2;
            if(nums[mid] == k) {
                while(nums[mid] == k) {
                    mid++;
                }
                return mid - 1;
            }
            if(nums[mid] > k) {
                right = mid - 1;
            }
            if(nums[mid] < k) {
                left = mid + 1;
            }
        }
        return -1;
    }
}
